/*
 * Copyright (c) 2007 The Chai Team
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */

package com.google.projects.chai.data;

import java.util.Collection;
import java.util.Date;

/**
 * Represents an expense record, indicating money owed by some people to other
 * people.
 * @author dap
 */
public class Expense {
        private long ExpenseId;
        
        /** The people who paid */
        private Collection<User> Creditors;
        /** The people who received goods or services */
        private Collection<User> Debtors;
        /** The person who entered the expense */
        private User Submitter;
        
        /** When the expense was actually purchased */
        // FIXME-dap: should use joda-time
        private Date DatePurchased;
        
        /** True iff this expense can be edited by the debtors and creditors */
        private boolean EditableByAgents;
        
        /** Where the expense took place */
        private String LocationPurchased;
        
        /** Tags associated with this expense */
        private Collection<String> Tags;
        
        /** True iff the expense has been deleted. */
        private boolean Deleted;
        
        private String ShortDescription;
        private String LongDescription;

        /* Accessors */

        public long getExpenseId() {
                return ExpenseId;
        }
        
        private void setExpenseId(long id) {
                ExpenseId = id;
        }
        
        public Collection<User> getCreditors() {
                return Creditors;
        }

        public void setCreditors(Collection<User> Creditors) {
                this.Creditors = Creditors;
        }

        public Collection<User> getDebtors() {
                return Debtors;
        }

        public void setDebtors(Collection<User> Debtors) {
                this.Debtors = Debtors;
        }

        public User getSubmitter() {
                return Submitter;
        }

        public void setSubmitter(User Submitter) {
                this.Submitter = Submitter;
        }

        public Date getDatePurchased() {
                return DatePurchased;
        }

        public void setDatePurchased(Date DatePurchased) {
                this.DatePurchased = DatePurchased;
        }

        public boolean isEditableByAgents() {
                return EditableByAgents;
        }

        public void setEditableByAgents(boolean EditableByAgents) {
                this.EditableByAgents = EditableByAgents;
        }

        public String getLocationPurchased() {
                return LocationPurchased;
        }

        public void setLocationPurchased(String LocationPurchased) {
                this.LocationPurchased = LocationPurchased;
        }

        public Collection<String> getTags() {
                return Tags;
        }

        public void setTags(Collection<String> Tags) {
                this.Tags = Tags;
        }

        public boolean isDeleted() {
                return Deleted;
        }

        public void setDeleted(boolean Deleted) {
                this.Deleted = Deleted;
        }

        public String getShortDescription() {
                return ShortDescription;
        }

        public void setShortDescription(String ShortDescription) {
                this.ShortDescription = ShortDescription;
        }

        public String getLongDescription() {
                return LongDescription;
        }

        public void setLongDescription(String LongDescription) {
                this.LongDescription = LongDescription;
        }
        
}
